package com.tgy.plus1.controller;

import com.tgy.plus1.dao.UserDao;
import com.tgy.plus1.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/***
 * @ClassName: Test
 * @Description:
 * @Auther: 送你一块二向箔
 * @Date: 10:18 2022/3/28
 * @version : V1.0
 */
@RestController
@Slf4j
public class Test {
    @Resource
    UserDao userDao;

    @RequestMapping("/aaa")
    public List<User> tese(){
        log.info("controller 开始{}","aaa");
        List<User> users = this.userDao.getAll();
        log.info("controller 结束");
        return users;
    }

    @RequestMapping("/bbb")
    public List<User> bbb(){
        log.info("controller 开始{}","selectList");
        List<User> users = this.userDao.selectList(null);
        log.info("controller 结束");
        return users;
    }
}
